#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
int main()
{
  pid_t id = fork();
  if(id<0)
  {
    return 1;
  }
  else if(id==0) 
  {
    //child
    printf("i am child pid:%d\n",getpid());
    sleep(10);
  }
  else
  {
    printf("i am parent pid:%d\n",getpid());
    sleep(3);
    exit(0);
  }
  return 0;
}
